Use verbatim strings in tooltip descriptions
Additionally escapes backslashes in the tooltip string. Only character that needs to be manually escaped is the double quotation marks.
This commit is contained in:
@@ -469,9 +469,8 @@ namespace Flax.Build.Bindings
|
||||
if (comment[i - 1].StartsWith("/// "))
|
||||
tooltip += " " + comment[i - 1].Substring(4);
|
||||
}
|
||||
if (tooltip.IndexOf('\"') != -1)
|
||||
tooltip = tooltip.Replace("\"", "\\\"");
|
||||
contents.Append(indent).Append("[Tooltip(\"").Append(tooltip).Append("\")]").AppendLine();
|
||||
tooltip = tooltip.Replace("\"", "\"\"");
|
||||
contents.Append(indent).Append("[Tooltip(@\"").Append(tooltip).Append("\")]").AppendLine();
|
||||
}
|
||||
}
|
||||
if (writeDefaultValue)
|
||||
|
||||
Reference in New Issue
Block a user