Browse Source

Fixed SD2-955: Incorrect C# syntax highlighting with verbatim string literals.

Fixed SD2-1093: XML syntax highlighting error having an element ending in a "\" character.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2115 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
355a5f4b59
  1. 95
      src/AddIns/Misc/HighlightingEditor/Project/Resources/RuleSet.xfrm
  2. 136
      src/AddIns/Misc/HighlightingEditor/Project/Resources/Span.xfrm
  3. 22
      src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs
  4. 32
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/RuleSetNode.cs
  5. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/RuleSetsNode.cs
  6. 35
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/SpanNode.cs
  7. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/ASPX.xshd
  8. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/Boo.xshd
  9. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/CPP-Mode.xshd
  10. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/CSharp-Mode.xshd
  11. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/Coco-Mode.xshd
  12. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd
  13. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/Java-Mode.xshd
  14. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/JavaScript-Mode.xshd
  15. 373
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/Mode.xsd
  16. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/PHP-Mode.xshd
  17. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/Tex-Mode.xshd
  18. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/VBNET-Mode.xshd
  19. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/XML-Mode.xshd
  20. 48
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs
  21. 10
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/HighlightRuleSet.cs
  22. 34
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/Span.cs

95
src/AddIns/Misc/HighlightingEditor/Project/Resources/RuleSet.xfrm

@ -1,111 +1,112 @@ @@ -1,111 +1,112 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="highlightingOptionPanel" />
<DockPadding value="" />
<ClientSize value="{Width=312, Height=376}" />
<Controls>
<System.Windows.Forms.TextBox>
<Name value="escCharTextBox" />
<TabIndex value="7" />
<MaxLength value="1" />
<Size value="61, 20" />
<Location value="146, 157" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Location value="3, 157" />
<Text value="${res:Dialog.HighlightingEditor.Span.EscChar}" />
<Size value="137, 23" />
<TabIndex value="6" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="igcaseBox" />
<Location value="{X=0,Y=128}" />
<ClientSize value="{Width=312, Height=16}" />
<Location value="0, 128" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.IgnoreCase}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
<Size value="312, 16" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox>
<Name value="refBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<Location value="{X=128,Y=32}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 32" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3a" />
<Location value="0, 35" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.Reference}" />
<Size value="128, 16" />
<TabIndex value="3" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=35}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="nameBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<Location value="{X=128,Y=5}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 5" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3b" />
<Location value="0, 8" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.Name}" />
<Size value="128, 16" />
<TabIndex value="1" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=8}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Panel>
<Name value="panel" />
<Location value="{X=0,Y=192}" />
<ClientSize value="{Width=312, Height=184}" />
<DockPadding value="" />
<Anchor value="Top, Bottom, Left, Right" />
<Location value="0, 192" />
<TabIndex value="0" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="312, 184" />
<Controls>
<System.Windows.Forms.Label>
<Name value="explLabel" />
<Location value="16, 24" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.Explanation}" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="280, 160" />
<TabIndex value="2" />
<ClientSize value="{Width=280, Height=160}" />
<Location value="{X=16,Y=24}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label" />
<Location value="0, 0" />
<Text value="${res:Dialog.HighlightingEditor.Explanation}" />
<Size value="96, 16" />
<TabIndex value="0" />
<ClientSize value="{Width=96, Height=16}" />
<Location value="{X=0,Y=0}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label2" />
<Location value="0, 8" />
<Anchor value="Top, Left, Right" />
<Size value="306, 0" />
<TabIndex value="1" />
<ClientSize value="{Width=306, Height=0}" />
<Location value="{X=0,Y=8}" />
<BorderStyle value="Fixed3D" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.Panel>
<System.Windows.Forms.TextBox>
<Name value="delimBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<Location value="{X=128,Y=69}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 69" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3c" />
<Location value="0, 72" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.Delimiters}" />
<Size value="128, 16" />
<TabIndex value="3" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=72}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3d" />
<Location value="16, 96" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.SpaceAndTab}" />
<Anchor value="Top, Left, Right" />
<Size value="280, 16" />
<TabIndex value="3" />
<ClientSize value="{Width=280, Height=16}" />
<Location value="{X=16,Y=96}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="noEscBox" />
<Location value="{X=0,Y=152}" />
<ClientSize value="{Width=312, Height=16}" />
<Text value="${res:Dialog.HighlightingEditor.RuleSet.NoEscapeSeq}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

136
src/AddIns/Misc/HighlightingEditor/Project/Resources/Span.xfrm

@ -1,183 +1,185 @@ @@ -1,183 +1,185 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="highlightingOptionPanel" />
<DockPadding value="" />
<ClientSize value="{Width=312, Height=408}" />
<Controls>
<System.Windows.Forms.TextBox>
<Name value="escCharTextBox" />
<TabIndex value="20" />
<MaxLength value="1" />
<Size value="100, 20" />
<Location value="128, 267" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Location value="0, 267" />
<Text value="${res:Dialog.HighlightingEditor.Span.EscChar}" />
<TextAlign value="MiddleLeft" />
<Size value="128, 23" />
<TabIndex value="19" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="chgCont" />
<Location value="{X=216,Y=208}" />
<ClientSize value="{Width=88, Height=23}" />
<Location value="216, 208" />
<Text value="${res:Dialog.HighlightingEditor.Change}" />
<Size value="88, 23" />
<TabIndex value="18" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Label>
<Name value="samCont" />
<Location value="216, 144" />
<Text value="${res:Dialog.HighlightingEditor.Span.ContCol}" />
<TextAlign value="MiddleCenter" />
<Size value="88, 40" />
<TabIndex value="16" />
<ClientSize value="{Width=88, Height=40}" />
<Location value="{X=216,Y=144}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="chgEnd" />
<Location value="{X=112,Y=208}" />
<ClientSize value="{Width=88, Height=23}" />
<Location value="112, 208" />
<Text value="${res:Dialog.HighlightingEditor.Change}" />
<Size value="88, 23" />
<TabIndex value="15" />
</System.Windows.Forms.Button>
<System.Windows.Forms.CheckBox>
<Name value="useEnd" />
<Location value="{X=112,Y=184}" />
<ClientSize value="{Width=88, Height=24}" />
<Location value="112, 184" />
<Text value="${res:Dialog.HighlightingEditor.Span.Use}" />
<TabIndex value="14" />
<Size value="88, 24" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="samEnd" />
<Location value="112, 144" />
<Text value="${res:Dialog.HighlightingEditor.Span.EndCol}" />
<TextAlign value="MiddleCenter" />
<Size value="88, 40" />
<TabIndex value="13" />
<ClientSize value="{Width=88, Height=40}" />
<Location value="{X=112,Y=144}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="chgBegin" />
<Location value="{X=8,Y=208}" />
<ClientSize value="{Width=88, Height=23}" />
<Location value="8, 208" />
<Text value="${res:Dialog.HighlightingEditor.Change}" />
<Size value="88, 23" />
<TabIndex value="12" />
</System.Windows.Forms.Button>
<System.Windows.Forms.CheckBox>
<Name value="useBegin" />
<Location value="{X=8,Y=184}" />
<ClientSize value="{Width=88, Height=24}" />
<Location value="8, 184" />
<Text value="${res:Dialog.HighlightingEditor.Span.Use}" />
<TabIndex value="11" />
<Size value="88, 24" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="samBegin" />
<Location value="8, 144" />
<Text value="${res:Dialog.HighlightingEditor.Span.BeginCol}" />
<TextAlign value="MiddleCenter" />
<Size value="88, 40" />
<TabIndex value="10" />
<ClientSize value="{Width=88, Height=40}" />
<Location value="{X=8,Y=144}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label7" />
<Location value="0, 112" />
<Text value="${res:Dialog.HighlightingEditor.Span.Colors}" />
<Size value="280, 16" />
<TabIndex value="9" />
<ClientSize value="{Width=280, Height=16}" />
<Location value="{X=0,Y=112}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="ruleBox" />
<Size value="184, 21" />
<TabIndex value="8" />
<Location value="{X=128,Y=80}" />
<ClientSize value="{Width=180, Height=21}" />
<Text value="comboBox" />
<Location value="128, 80" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3wjej" />
<Location value="0, 83" />
<Text value="${res:Dialog.HighlightingEditor.Span.Ruleset}" />
<Size value="128, 16" />
<TabIndex value="6" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=83}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="stopEolBox" />
<Location value="{X=0,Y=248}" />
<ClientSize value="{Width=312, Height=16}" />
<Location value="0, 248" />
<Text value="${res:Dialog.HighlightingEditor.Span.StopEol}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
<Size value="312, 16" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox>
<Name value="beginBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<Location value="{X=128,Y=27}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 27" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3qgae" />
<Location value="0, 30" />
<Text value="${res:Dialog.HighlightingEditor.Span.Begin}" />
<Size value="128, 16" />
<TabIndex value="3" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=30}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="nameBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<Location value="{X=128,Y=0}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 0" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3wr" />
<Location value="0, 3" />
<Text value="${res:Dialog.HighlightingEditor.Span.Name}" />
<Size value="128, 16" />
<TabIndex value="1" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=3}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Panel>
<Name value="panel" />
<Location value="{X=0,Y=304}" />
<ClientSize value="{Width=312, Height=104}" />
<DockPadding value="" />
<Anchor value="Top, Bottom, Left, Right" />
<Location value="0, 304" />
<TabIndex value="0" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="312, 104" />
<Controls>
<System.Windows.Forms.Label>
<Name value="explLabel" />
<Location value="16, 24" />
<Text value="${res:Dialog.HighlightingEditor.Span.Explanation}" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="280, 80" />
<TabIndex value="2" />
<ClientSize value="{Width=280, Height=80}" />
<Location value="{X=16,Y=24}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label" />
<Location value="0, 0" />
<Text value="${res:Dialog.HighlightingEditor.Explanation}" />
<Size value="96, 16" />
<TabIndex value="0" />
<ClientSize value="{Width=96, Height=16}" />
<Location value="{X=0,Y=0}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Label>
<Name value="label2" />
<Location value="0, 8" />
<Anchor value="Top, Left, Right" />
<Size value="302, 0" />
<TabIndex value="1" />
<ClientSize value="{Width=302, Height=0}" />
<Location value="{X=0,Y=8}" />
<BorderStyle value="Fixed3D" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.Panel>
<System.Windows.Forms.TextBox>
<Name value="endBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<Location value="{X=128,Y=51}" />
<ClientSize value="{Width=180, Height=17}" />
<Text value="" />
<Size value="184, 20" />
<Location value="128, 51" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Name value="label3b" />
<Location value="0, 54" />
<Text value="${res:Dialog.HighlightingEditor.Span.End}" />
<Size value="128, 16" />
<TabIndex value="3" />
<ClientSize value="{Width=128, Height=16}" />
<Location value="{X=0,Y=54}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="noEscBox" />
<Location value="{X=0,Y=272}" />
<ClientSize value="{Width=312, Height=16}" />
<Text value="${res:Dialog.HighlightingEditor.Span.NoEscSeq}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

22
src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs

@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
}
foreach(string str in uCol) {
SchemeNode node = LoadFile(new XmlTextReader(str), true);
SchemeNode node = LoadFile(new XmlTextReader(str), true, Path.GetFileNameWithoutExtension(str));
if (node == null) continue;
userList.Items.Add(new HighlightItem(null, str, node));
}
@ -125,7 +125,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -125,7 +125,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
modeProvider = new ResourceSyntaxModeProvider();
foreach(SyntaxMode mode in modeProvider.SyntaxModes) {
SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false);
SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false, mode.Name);
if (node == null) continue;
builtinList.Items.Add(new HighlightItem(mode, null, node));
}
@ -133,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -133,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
modeProvider = new ICSharpCode.SharpDevelop.DefaultEditor.Codons.AddInTreeSyntaxModeProvider();
foreach(SyntaxMode mode in modeProvider.SyntaxModes) {
SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false);
SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false, mode.Name);
if (node == null) continue;
builtinList.Items.Add(new HighlightItem(mode, null, node));
}
@ -163,7 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -163,7 +163,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
fs.Write(item.Node.Content);
}
SchemeNode newNode = LoadFile(new XmlTextReader(newname), true);
SchemeNode newNode = LoadFile(new XmlTextReader(newname), true, Path.GetFileNameWithoutExtension(newname));
if (newNode == null) throw new Exception();
userList.Items.Add(new HighlightItem(null, newname, newNode));
@ -223,8 +223,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -223,8 +223,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
List<ValidationEventArgs> errors = new List<ValidationEventArgs>();
private SchemeNode LoadFile(XmlTextReader reader, bool userList)
private SchemeNode LoadFile(XmlTextReader reader, bool userList, string name)
{
errors.Clear();
try {
XmlValidatingReader validatingReader = new XmlValidatingReader(reader);
Stream schemaStream = typeof(SyntaxMode).Assembly.GetManifestResourceStream("ICSharpCode.TextEditor.Resources.Mode.xsd");
@ -236,14 +237,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -236,14 +237,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
doc.Load(validatingReader);
if (errors.Count != 0) {
ReportErrors();
ReportErrors(name);
return null;
} else {
return new SchemeNode(doc.DocumentElement, userList);
}
} catch (Exception e) {
MessageService.ShowError(e, "${res:Dialog.Options.TextEditorOptions.EditHighlighting.LoadError}");
MessageService.ShowError(e, name + ": ${res:Dialog.Options.TextEditorOptions.EditHighlighting.LoadError}");
return null;
} finally {
reader.Close();
@ -256,13 +257,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -256,13 +257,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
errors.Add(args);
}
private void ReportErrors()
private void ReportErrors(string name)
{
StringBuilder msg = new StringBuilder();
msg.Append(name);
msg.Append(": ");
msg.Append(ResourceService.GetString("Dialog.Options.TextEditorOptions.EditHighlighting.LoadError") + "\n\n");
foreach(ValidationEventArgs args in errors) {
msg.Append(args.Message);
msg.Append(Console.Out.NewLine);
msg.AppendLine(args.Message);
}
MessageService.ShowWarning(msg.ToString());

32
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/RuleSetNode.cs

@ -15,7 +15,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -15,7 +15,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
class RuleSetNode : AbstractNode
{
bool noEscapeSequences = false;
char escapeCharacter;
bool ignoreCase = false;
bool isRoot = false;
string name = String.Empty;
@ -46,8 +46,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -46,8 +46,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
isRoot = true;
}
if (el.Attributes["noescapesequences"] != null) {
noEscapeSequences = Boolean.Parse(el.Attributes["noescapesequences"].InnerText);
if (el.Attributes["escapecharacter"] != null) {
escapeCharacter = el.Attributes["escapecharacter"].InnerText[0];
}
if (el.Attributes["reference"] != null) {
@ -73,13 +73,13 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -73,13 +73,13 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
public RuleSetNode(string Name, string Delim, string Ref, bool noEsc, bool noCase)
public RuleSetNode(string Name, string Delim, string Ref, char escChar, bool noCase)
{
name = Name;
Text = Name;
delimiters = Delim;
reference = Ref;
noEscapeSequences = noEsc;
escapeCharacter = escChar;
ignoreCase = noCase;
keywordNode = new KeywordListsNode(null);
@ -110,8 +110,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -110,8 +110,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
writer.WriteAttributeString("reference", reference);
} else {
writer.WriteAttributeString("ignorecase", ignoreCase.ToString().ToLowerInvariant());
if (noEscapeSequences)
writer.WriteAttributeString("noescapesequences", "true");
if (escapeCharacter != '\0')
writer.WriteAttributeString("escapecharacter", escapeCharacter.ToString());
if (delimiters != "")
writer.WriteElementString("Delimiters", delimiters);
spansNode.WriteXml(writer);
@ -131,13 +131,9 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -131,13 +131,9 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
}
public bool NoEscapeSequences {
get {
return noEscapeSequences;
}
set {
noEscapeSequences = value;
}
public char EscapeCharacter {
get { return escapeCharacter; }
set { escapeCharacter = value; }
}
public bool IgnoreCase {
@ -178,7 +174,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -178,7 +174,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
class RuleSetOptionPanel : NodeOptionPanel
{
private System.Windows.Forms.CheckBox igcaseBox;
private System.Windows.Forms.CheckBox noEscBox;
private System.Windows.Forms.TextBox escCharTextBox;
private System.Windows.Forms.TextBox refBox;
private System.Windows.Forms.TextBox delimBox;
private System.Windows.Forms.TextBox nameBox;
@ -192,7 +188,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -192,7 +188,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
delimBox = (TextBox)ControlDictionary["delimBox"];
igcaseBox = (CheckBox)ControlDictionary["igcaseBox"];
noEscBox = (CheckBox)ControlDictionary["noEscBox"];
escCharTextBox = (TextBox)ControlDictionary["escCharTextBox"];
}
public override void StoreSettings()
@ -201,7 +197,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -201,7 +197,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
if (!node.IsRoot) node.Name = nameBox.Text;
node.Reference = refBox.Text;
node.Delimiters = delimBox.Text;
node.NoEscapeSequences = noEscBox.Checked;
node.EscapeCharacter = (escCharTextBox.TextLength == 0) ? '\0' : escCharTextBox.Text[0];
node.IgnoreCase = igcaseBox.Checked;
}
@ -219,7 +215,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -219,7 +215,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
refBox.Text = node.Reference;
delimBox.Text = node.Delimiters;
noEscBox.Checked = node.NoEscapeSequences;
escCharTextBox.Text = (node.EscapeCharacter == '\0') ? "" : node.EscapeCharacter.ToString();
igcaseBox.Checked = node.IgnoreCase;
}

2
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/RuleSetsNode.cs

@ -92,7 +92,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -92,7 +92,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
return;
}
RuleSetNode rsn = new RuleSetNode(box.TextBox.Text, "&<>~!@%^*()-+=|\\#/{}[]:;\"' , .?", "", false, false);
RuleSetNode rsn = new RuleSetNode(box.TextBox.Text, "&<>~!@%^*()-+=|\\#/{}[]:;\"' , .?", "", '\0', false);
ListViewItem lv = new ListViewItem(box.TextBox.Text);
lv.Tag = rsn;
parent.Nodes.Add(rsn);

35
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/SpanNode.cs

@ -24,7 +24,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -24,7 +24,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
string end = "";
string name = "";
string rule = "";
bool noEscapeSequences = false;
char escapeCharacter;
public SpanNode(XmlElement el)
{
@ -40,12 +40,16 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -40,12 +40,16 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
rule = el.Attributes["rule"].InnerText;
}
if (el.Attributes["noescapesequences"] != null) {
noEscapeSequences = Boolean.Parse(el.Attributes["noescapesequences"].InnerText);
if (el.Attributes["escapecharacter"] != null) {
escapeCharacter = el.Attributes["escapecharacter"].Value[0];
}
name = el.Attributes["name"].InnerText;
stopEOL = Boolean.Parse(el.Attributes["stopateol"].InnerText);
if (el.HasAttribute("stopateol")) {
stopEOL = Boolean.Parse(el.Attributes["stopateol"].InnerText);
} else {
stopEOL = true;
}
begin = el["Begin"].InnerText;
beginColor = new EditorHighlightColor(el["Begin"]);
@ -62,8 +66,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -62,8 +66,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
writer.WriteStartElement("Span");
writer.WriteAttributeString("name", name);
if (noEscapeSequences)
writer.WriteAttributeString("noescapesequences", "true");
if (escapeCharacter != '\0')
writer.WriteAttributeString("escapecharacter", escapeCharacter.ToString());
if (rule != "")
writer.WriteAttributeString("rule", rule);
writer.WriteAttributeString("stopateol", stopEOL.ToString().ToLowerInvariant());
@ -179,15 +183,10 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -179,15 +183,10 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
}
public bool NoEscapeSequences {
get {
return noEscapeSequences;
}
set {
noEscapeSequences = value;
}
public char EscapeCharacter {
get { return escapeCharacter; }
set { escapeCharacter = value; }
}
}
class SpanOptionPanel : NodeOptionPanel {
@ -204,7 +203,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -204,7 +203,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
private System.Windows.Forms.Label samBegin;
private System.Windows.Forms.Label samEnd;
private System.Windows.Forms.Label samCont;
private System.Windows.Forms.CheckBox noEscBox;
private System.Windows.Forms.TextBox escCharTextBox;
private System.Windows.Forms.CheckBox stopEolBox;
public SpanOptionPanel(SpanNode parent) : base(parent)
@ -227,7 +226,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -227,7 +226,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
samCont = (Label)ControlDictionary["samCont"];
stopEolBox = (CheckBox)ControlDictionary["stopEolBox"];
noEscBox = (CheckBox)ControlDictionary["noEscBox"];
escCharTextBox = (TextBox)ControlDictionary["escCharTextBox"];
this.chgBegin.Click += new EventHandler(chgBeginClick);
this.chgCont.Click += new EventHandler(chgContClick);
@ -249,7 +248,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -249,7 +248,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
node.Begin = beginBox.Text;
node.End = endBox.Text;
node.StopEOL = stopEolBox.Checked;
node.NoEscapeSequences = noEscBox.Checked;
node.EscapeCharacter = escCharTextBox.TextLength > 0 ? escCharTextBox.Text[0] : '\0';
node.Rule = ruleBox.Text;
node.Color = color;
@ -287,7 +286,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -287,7 +286,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
beginBox.Text = node.Begin;
endBox.Text = node.End;
stopEolBox.Checked = node.StopEOL;
noEscBox.Checked = node.NoEscapeSequences;
escCharTextBox.Text = (node.EscapeCharacter == '\0') ? "" : node.EscapeCharacter.ToString();
color = node.Color;
beginColor = node.BeginColor;

2
src/Libraries/ICSharpCode.TextEditor/Project/Resources/ASPX.xshd

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<?xml version="1.0"?>
<SyntaxDefinition name = "ASP/XHTML" extensions = ".asp;.aspx;.asax;.asmx" extends = "HTML">
<RuleSets>
<RuleSet ignorecase = "true" noescapesequences="true">
<RuleSet ignorecase = "true">
<Span name = "ASPCode" rule = "ASP" bold = "false" italic = "false" color = "Black" bgcolor = "#F7F2E3" stopateol = "false">
<Begin color="Black" bgcolor="Yellow">&lt;%</Begin>
<End color="Black" bgcolor="Yellow">%&gt;</End>

8
src/Libraries/ICSharpCode.TextEditor/Project/Resources/Boo.xshd

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<RuleSet ignorecase="false" >
<Delimiters>&amp;&lt;&gt;~!@$%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
<Span name="DocLineComment" noescapesequences="true" stopateol="false" bold="false" italic="false" color="Green">
<Span name="DocLineComment" stopateol="false" bold="false" italic="false" color="Green">
<Begin >"""</Begin>
<End >"""</End>
</Span>
@ -45,17 +45,17 @@ @@ -45,17 +45,17 @@
<End >*/</End>
</Span>
<Span name="String" rule="str formatting" stopateol="true" bold="false" italic="false" color="Blue" >
<Span name="String" rule="str formatting" stopateol="true" bold="false" italic="false" color="Blue" escapecharacter="\">
<Begin >"</Begin>
<End >"</End>
</Span>
<Span name="MultiLineString" noescapesequences="true" rule="str formatting" stopateol="false" bold="false" italic="false" color="Blue" >
<Span name="MultiLineString" rule="str formatting" stopateol="false" bold="false" italic="false" color="Blue" >
<Begin >"""</Begin>
<End >"""</End>
</Span>
<Span name="Char" stopateol="true" bold="false" italic="false" color="Blue" >
<Span name="Char" stopateol="true" bold="false" italic="false" color="Blue" escapecharacter="\">
<Begin >'</Begin>
<End >'</End>
</Span>

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/CPP-Mode.xshd

@ -26,12 +26,12 @@ @@ -26,12 +26,12 @@
<End>*/</End>
</Span>
<Span name = "String" bold = "false" italic = "false" color = "Magenta" stopateol = "true">
<Span name = "String" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name = "Char" bold = "false" italic = "false" color = "Magenta" stopateol = "true">
<Span name = "Char" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\">
<Begin>&apos;</Begin>
<End>&apos;</End>
</Span>

6
src/Libraries/ICSharpCode.TextEditor/Project/Resources/CSharp-Mode.xshd

@ -33,17 +33,17 @@ @@ -33,17 +33,17 @@
<End>*/</End>
</Span>
<Span name = "String" bold = "false" italic = "false" color = "Blue" stopateol = "true">
<Span name = "String" bold = "false" italic = "false" color = "Blue" stopateol = "true" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name = "MultiLineString" bold = "false" italic = "false" color = "Blue" stopateol = "false" noescapesequences="true">
<Span name = "MultiLineString" bold = "false" italic = "false" color = "Blue" stopateol = "false" escapecharacter='"'>
<Begin>@@"</Begin>
<End>"</End>
</Span>
<Span name = "Char" bold = "false" italic = "false" color = "Magenta" stopateol = "true">
<Span name = "Char" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\">
<Begin>&apos;</Begin>
<End>&apos;</End>
</Span>

8
src/Libraries/ICSharpCode.TextEditor/Project/Resources/Coco-Mode.xshd

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
<Digits name="Digits" bold="false" italic="false" color="DarkBlue" />
<RuleSets>
<RuleSet ignorecase="false" noescapesequences="true">
<RuleSet ignorecase="false">
<Delimiters>&amp;&lt;&gt;~!@%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
<Span name = "LINECOMMENT" bold = "false" italic = "true" color = "Gray" stopateol = "true">
@ -82,13 +82,13 @@ @@ -82,13 +82,13 @@
</RuleSet>
<RuleSet name="CSharp" reference = "C#" ignorecase="false" noescapesequences="true">
<RuleSet name="CSharp" reference = "C#" ignorecase="false">
</RuleSet>
<RuleSet name="ParamList" reference = "C#" ignorecase="false" noescapesequences="true">
<RuleSet name="ParamList" reference = "C#" ignorecase="false">
</RuleSet>
<RuleSet name="RuleDefinition" ignorecase="false" noescapesequences="true">
<RuleSet name="RuleDefinition" ignorecase="false">
</RuleSet>

6
src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<Digits name = "Digits" bold = "false" italic = "false" color = "DarkBlue"/>
<RuleSets>
<RuleSet ignorecase = "true" noescapesequences="true">
<RuleSet ignorecase = "true">
<!-- It is not necessary to define span-delimiting characters as delimiters -->
<Delimiters></Delimiters>
@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
<RuleSet name="JavaScriptSet" reference="JavaScript" />
<RuleSet name="EntityReferenceSet" ignorecase="false" noescapesequences="true">
<RuleSet name="EntityReferenceSet" ignorecase="false">
<KeyWords name = "Entities" bold="false" italic="false" color="Green">
<Key word = "aacute" />
<Key word = "agrave" />
@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
</KeyWords>
</RuleSet>
<RuleSet name="HtmlTagSet" ignorecase="false" noescapesequences="true">
<RuleSet name="HtmlTagSet" ignorecase="false">
<Delimiters>/=</Delimiters>
<Span name="String" bold="false" italic="false" color="Blue" stopateol="true">

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/Java-Mode.xshd

@ -23,12 +23,12 @@ @@ -23,12 +23,12 @@
<End>*/</End>
</Span>
<Span name = "STRING" bold = "false" italic = "false" color = "Magenta" stopateol = "true">
<Span name = "STRING" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name = "CHAR" bold = "false" italic = "false" color = "Magenta" stopateol = "true">
<Span name = "CHAR" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\">
<Begin>'</Begin>
<End>'</End>
</Span>

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/JavaScript-Mode.xshd

@ -22,12 +22,12 @@ @@ -22,12 +22,12 @@
<End>*/</End>
</Span>
<Span name ="String" bold ="false" italic ="false" color ="Sienna" stopateol ="false">
<Span name ="String" bold ="false" italic ="false" color ="Sienna" stopateol ="false" escapecharacter="\">
<Begin>&quot;</Begin>
<End>&quot;</End>
</Span>
<Span name = "Character" bold = "false" italic = "false" color = "Sienna" stopateol = "true">
<Span name = "Character" bold = "false" italic = "false" color = "Sienna" stopateol = "true" escapecharacter="\">
<Begin>&apos;</Begin>
<End>&apos;</End>
</Span>

373
src/Libraries/ICSharpCode.TextEditor/Project/Resources/Mode.xsd

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:annotation>
<xsd:documentation>
<xsd:annotation>
<xsd:documentation>
This schema defines the syntax for mode definitions in SharpDevelop.
The schema can be simplified quite a bit but it does the job as is.
@ -16,111 +16,111 @@ @@ -16,111 +16,111 @@
will be rendered in the current default color. Which is the default color of the
current span or the default color of the mode as a whole if no span has been entered.
</xsd:documentation>
</xsd:annotation>
</xsd:annotation>
<!-- Defines the default rendering of the mode -->
<xsd:complexType name="EnvironmentEntry">
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="CustomEnvironmentEntry">
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<!-- The environment tag defines the coloring of various attributes in SharpDevelop -->
<xsd:complexType name="Environment">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
<xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="Properties">
<xsd:sequence>
<xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
<xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="Properties">
<xsd:sequence>
<xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Property">
<!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="value" type="xsd:string" />
</xsd:complexType>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="value" type="xsd:string" />
</xsd:complexType>
<!-- The Digits tag defines the color for rendering Digits-->
<xsd:complexType name="Digits">
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
into separate symbols, typically key words. It is not necessary, or desirable to include the
characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
<xsd:complexType name="Delimiters">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The beginning symbol of a Span -->
<xsd:complexType name="Delimiters">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The beginning symbol of a Span -->
<xsd:complexType name="Begin">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<xsd:attribute name="startofline" type="xsd:boolean" />
<!-- The default rendering style for the Begin symbol. If not specified
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<xsd:attribute name="startofline" type="xsd:boolean" />
<!-- The default rendering style for the Begin symbol. If not specified
the defaul rendering style for the span will be used. -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The end symbol of a Span -->
<xsd:complexType name="End">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The end symbol of a Span -->
<xsd:complexType name="End">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<!-- The default rendering style for the End symbol. If not specified
the defaul rendering style for the span will be used. -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Span">
<xsd:sequence>
<!-- Defines the symbol that indicates the beginning of the span. -->
@ -130,81 +130,86 @@ @@ -130,81 +130,86 @@
<xsd:element name="End" minOccurs="0" type="End" />
</xsd:sequence>
<!-- The name of the span definition -->
<xsd:attribute name="name" type="xsd:string" use="required" />
<!-- Defines the rule set that is applicable in the Span. May be omitted. -->
<xsd:attribute name="rule" type="xsd:string" />
<!-- Defines wether the Span should terminate automatically at the end of line. Typical examples
<xsd:attribute name="name" type="xsd:string" use="required" />
<!-- Defines the rule set that is applicable in the Span. May be omitted. -->
<xsd:attribute name="rule" type="xsd:string" />
<!-- Defines wether the Span should terminate automatically at the end of line. Typical examples
include one-line comments such as // in C++ or REM in Windows .Bat files. -->
<xsd:attribute name="stopateol" type="xsd:boolean" />
<!-- Defines whether C-style escape sequences using \ are applicable or not in the span. -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
<xsd:attribute name="stopateol" type="xsd:boolean" />
<!-- OBSOLUTE: Defines whether C-style escape sequences using \ are applicable or not in the span. -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
<!-- defines the escape character -->
<xsd:attribute name="escapecharacter" type="xsd:string" />
<!-- The default rendering style for the span -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="MarkPrevious">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Allows you to define the coloring of the symbol that follows a specified symbol -->
<xsd:complexType name="MarkFollowing">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="MarkPrevious">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Allows you to define the coloring of the symbol that follows a specified symbol -->
<xsd:complexType name="MarkFollowing">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Key">
<!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
<xsd:attribute name="word" type="xsd:string" />
</xsd:complexType>
<xsd:attribute name="word" type="xsd:string" />
</xsd:complexType>
<!-- A grouping of keywords that sholuld be colored the same way -->
<xsd:complexType name="KeyWords">
<xsd:sequence>
<!-- A KeyWord -->
<xsd:element name="Key" type="Key" minOccurs="1" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the KeyWord group -->
<xsd:attribute name="name" type="xsd:string" />
<!-- The rendering style of the KeyWord group -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:sequence>
<!-- A KeyWord -->
<xsd:element name="Key" type="Key" minOccurs="1" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the KeyWord group -->
<xsd:attribute name="name" type="xsd:string" />
<!-- The rendering style of the KeyWord group -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="RuleSet">
<xsd:sequence>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
<xsd:sequence>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
into separate symbols, typically key words. It is not necessary, or desirable to include the
characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
<xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1">
</xsd:element>
<!-- A Span tag defines a scope, or what can be seen as a separate parsing context where a different set of
<xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1">
</xsd:element>
<!-- A Span tag defines a scope, or what can be seen as a separate parsing context where a different set of
highlighting rules are applicable compared to the text where the span is found.
Examples of spans include:
- A string in a language as C
@ -212,46 +217,48 @@ @@ -212,46 +217,48 @@
- The internals of a tag in XML (between < and >).
A span can have a rule set associated with it that defines the highlighting rules that are applicable
in the span. -->
<xsd:element name="Span" type="Span" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkPrevious tag allows you to define the coloring of the item that preceeds a specific
<xsd:element name="Span" type="Span" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkPrevious tag allows you to define the coloring of the item that preceeds a specific
symbol. An example of where this comes in handy is when coloring the contents of an XML-tag,
in particular the attributes and attribute names. The following definition:
<MarkPrevious bold="false" italic="false" color="Red">=</MarkPrevious>
will make teh highlighter color words that are followed by an = to be colored in Red.
You can see this in this file if you view it with the default XML-mode in SharpDevelop. -->
<xsd:element name="MarkPrevious" type="MarkPrevious" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkFollowing tag works similarly as the MarkPrevious tag but relates to the coloring
<xsd:element name="MarkPrevious" type="MarkPrevious" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkFollowing tag works similarly as the MarkPrevious tag but relates to the coloring
of the symbol that follows the specified symbol. -->
<xsd:element name="MarkFollowing" type="MarkFollowing" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- Defines a group of keywords that should be colored the same way -->
<xsd:element name="KeyWords" type="KeyWords" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the RuleSet. Used when you refer to the RuleSet in the rule attribute of a Span tag.
<xsd:element name="MarkFollowing" type="MarkFollowing" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- Defines a group of keywords that should be colored the same way -->
<xsd:element name="KeyWords" type="KeyWords" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the RuleSet. Used when you refer to the RuleSet in the rule attribute of a Span tag.
Each mode file should have a rule definition without a defined name. This denotes the default rule
set for the mode. -->
<xsd:attribute name="name" type="xsd:string" />
<!-- Allows you to use another mode, defined in another file as a RuleSet. For an example see the
<xsd:attribute name="name" type="xsd:string" />
<!-- Allows you to use another mode, defined in another file as a RuleSet. For an example see the
use of the JavaScript mode from the HTML-mode. -->
<xsd:attribute name="reference" type="xsd:string" />
<!-- Defines whether case is significant for matching keywords in the mode. -->
<xsd:attribute name="ignorecase" type="xsd:boolean" />
<!-- Defined whether C-style escape sequences using \ is applicable for the RuleSet or not. -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
</xsd:complexType>
<!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. -->
<xsd:attribute name="reference" type="xsd:string" />
<!-- Defines whether case is significant for matching keywords in the mode. -->
<xsd:attribute name="ignorecase" type="xsd:boolean" />
<!-- OBSOLETE: noescapesequences -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
<!-- defines the escape character -->
<xsd:attribute name="escapecharacter" type="xsd:string" />
</xsd:complexType>
<!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. -->
<xsd:complexType name="RuleSets">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<!-- Any number of RuleSet tag can be defined in a mode -->
<xsd:element name="RuleSet" type="RuleSet" minOccurs="1" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<!-- Any number of RuleSet tag can be defined in a mode -->
<xsd:element name="RuleSet" type="RuleSet" minOccurs="1" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- SyntaxDefinition is the root-element in a mode definition file -->
<xsd:element name="SyntaxDefinition">
<xsd:complexType>
@ -270,7 +277,7 @@ @@ -270,7 +277,7 @@
a flat structture even if they are used recursively. For an example of a mode that uses
multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set
that handles highligting within a tag, i.e., between < and >. -->
<xsd:element name="RuleSets" type="RuleSets" />
<xsd:element name="RuleSets" type="RuleSets" />
</xsd:sequence>
<!-- The name of the mode. This is used when you, in the defintion of a RuleSet refers to another
mode. I.e., one that is defined in an external file. For an example of this see the HTML-Mode that

6
src/Libraries/ICSharpCode.TextEditor/Project/Resources/PHP-Mode.xshd

@ -26,17 +26,17 @@ @@ -26,17 +26,17 @@
<End>*/</End>
</Span>
<Span name ="STRING" bold ="false" italic ="false" color ="Magenta" stopateol ="true">
<Span name ="STRING" bold ="false" italic ="false" color ="Magenta" stopateol ="true" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name ="MORELINEDSTRING" bold ="false" italic ="false" color ="Magenta" stopateol ="false">
<Span name ="MORELINEDSTRING" bold ="false" italic ="false" color ="Magenta" stopateol ="false" escapecharacter="\">
<Begin>@@"</Begin>
<End>"</End>
</Span>
<Span name ="CHAR" bold ="false" italic ="false" color ="Magenta" stopateol ="true">
<Span name ="CHAR" bold ="false" italic ="false" color ="Magenta" stopateol ="true" escapecharacter="\">
<Begin>'</Begin>
<End>'</End>
</Span>

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/Tex-Mode.xshd

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<Digits name = "Digits" bold = "false" italic = "false" color = "Black"/>
<RuleSets>
<RuleSet ignorecase = "false" noescapesequences="true">
<RuleSet ignorecase = "false">
<Delimiters>&amp;~!@%^*()-+=|\#/{}[]:;"'&lt;&gt; , .?</Delimiters>
<Span name = "LineComment" bold = "false" italic = "true" color = "SlateGray" stopateol = "true">
@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
</KeyWords>
</RuleSet>
<RuleSet name = "MathMode" ignorecase = "false" noescapesequences="true">
<RuleSet name = "MathMode" ignorecase = "false">
<Delimiters>&amp;~!@%^*()-+=|\#/{}[]:;"'&lt;&gt; , .?</Delimiters>

2
src/Libraries/ICSharpCode.TextEditor/Project/Resources/VBNET-Mode.xshd

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
<Delimiters>~!@%^*()-+=|\#/{}[]:;"'&lt;&gt;,.?</Delimiters>
<Span name = "STRING" bold = "false" italic = "false" color = "Black" stopateol = "true">
<Span name = "STRING" bold = "false" italic = "false" color = "Black" stopateol = "true" escapecharacter='"'>
<Begin>"</Begin>
<End>"</End>
</Span>

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/XML-Mode.xshd

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
</Properties>
<Digits name="Digits" bold="false" italic="false" color="DarkBlue" />
<RuleSets>
<RuleSet ignorecase="false" noescapesequences="true">
<RuleSet ignorecase="false">
<!-- It is not necessary to define span-delimiting characters as delimiters -->
<Delimiters></Delimiters>
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
</Span>
</RuleSet>
<RuleSet name="XmlTagSet" ignorecase="false" noescapesequences="true">
<RuleSet name="XmlTagSet" ignorecase="false">
<Delimiters>/=</Delimiters>
<Span name="String" bold="false" italic="false" color="Blue" stopateol="true">
<Begin>&quot;</Begin>

48
src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs

@ -500,20 +500,42 @@ namespace ICSharpCode.TextEditor.Document @@ -500,20 +500,42 @@ namespace ICSharpCode.TextEditor.Document
}
++currentOffset;
break;
case '\\': // handle escape chars
if ((activeRuleSet != null && activeRuleSet.NoEscapeSequences) ||
(activeSpan != null && activeSpan.NoEscapeSequences)) {
goto default;
}
++currentLength;
if (i + 1 < currentLine.Length) {
++currentLength;
}
PushCurWord(document, ref markNext, words);
++i;
continue;
default:
{
// handle escape characters
char escapeCharacter = '\0';
if (activeSpan != null && activeSpan.EscapeCharacter != '\0') {
escapeCharacter = activeSpan.EscapeCharacter;
} else if (activeRuleSet != null) {
escapeCharacter = activeRuleSet.EscapeCharacter;
}
if (escapeCharacter != '\0' && escapeCharacter == ch) {
// we found the escape character
if (activeSpan != null && activeSpan.End != null && activeSpan.End.Length == 1
&& escapeCharacter == activeSpan.End[0])
{
// the escape character is a end-doubling escape character
// it may count as escape only when the next character is the escape, too
if (i + 1 < currentLine.Length) {
if (document.GetCharAt(currentLine.Offset + i + 1) == escapeCharacter) {
currentLength += 2;
PushCurWord(document, ref markNext, words);
++i;
continue;
}
}
} else {
// this is a normal \-style escape
++currentLength;
if (i + 1 < currentLine.Length) {
++currentLength;
}
PushCurWord(document, ref markNext, words);
++i;
continue;
}
}
// highlight digits
if (!inSpan && (Char.IsDigit(ch) || (ch == '.' && i + 1 < currentLine.Length && Char.IsDigit(document.GetCharAt(currentLine.Offset + i + 1)))) && currentLength == 0) {
bool ishex = false;
@ -594,7 +616,7 @@ namespace ICSharpCode.TextEditor.Document @@ -594,7 +616,7 @@ namespace ICSharpCode.TextEditor.Document
// Check for SPAN ENDs
if (inSpan) {
if (activeSpan.End != null && !activeSpan.End.Equals("")) {
if (activeSpan.End != null && activeSpan.End.Length > 0) {
if (currentLine.MatchExpr(activeSpan.End, i, document, activeSpan.IgnoreCase)) {
PushCurWord(document, ref markNext, words);
string regex = currentLine.GetRegString(activeSpan.End, i, document);

10
src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/HighlightRuleSet.cs

@ -20,7 +20,7 @@ namespace ICSharpCode.TextEditor.Document @@ -20,7 +20,7 @@ namespace ICSharpCode.TextEditor.Document
LookupTable prevMarkers;
LookupTable nextMarkers;
IHighlightingStrategy highlighter = null;
bool noEscapeSequences = false;
char escapeCharacter;
bool ignoreCase = false;
string name = null;
@ -68,9 +68,9 @@ namespace ICSharpCode.TextEditor.Document @@ -68,9 +68,9 @@ namespace ICSharpCode.TextEditor.Document
}
}
public bool NoEscapeSequences {
public char EscapeCharacter {
get {
return noEscapeSequences;
return escapeCharacter;
}
}
@ -110,8 +110,8 @@ namespace ICSharpCode.TextEditor.Document @@ -110,8 +110,8 @@ namespace ICSharpCode.TextEditor.Document
Name = el.Attributes["name"].InnerText;
}
if (el.Attributes["noescapesequences"] != null) {
noEscapeSequences = Boolean.Parse(el.Attributes["noescapesequences"].InnerText);
if (el.HasAttribute("escapecharacter")) {
escapeCharacter = el.GetAttribute("escapecharacter")[0];
}
if (el.Attributes["reference"] != null) {

34
src/Libraries/ICSharpCode.TextEditor/Project/Src/Document/HighlightingStrategy/Span.cs

@ -21,7 +21,7 @@ namespace ICSharpCode.TextEditor.Document @@ -21,7 +21,7 @@ namespace ICSharpCode.TextEditor.Document
string name;
string rule;
HighlightRuleSet ruleSet;
bool noEscapeSequences;
char escapeCharacter;
bool ignoreCase;
bool isBeginSingleWord;
bool? isBeginStartOfLine;
@ -92,33 +92,29 @@ namespace ICSharpCode.TextEditor.Document @@ -92,33 +92,29 @@ namespace ICSharpCode.TextEditor.Document
}
public char[] Begin {
get {
return begin;
}
get { return begin; }
}
public char[] End {
get {
return end;
}
get { return end; }
}
public string Name {
get {
return name;
}
get { return name; }
}
public string Rule {
get {
return rule;
}
get { return rule; }
}
public bool NoEscapeSequences {
get {
return noEscapeSequences;
}
/// <summary>
/// Gets the escape character of the span. The escape character is a character that can be used in front
/// of the span end to make it not end the span. The escape character followed by another escape character
/// means the escape character was escaped like in @"a "" b" literals in C#.
/// The default value '\0' means no escape character is allowed.
/// </summary>
public char EscapeCharacter {
get { return escapeCharacter; }
}
public Span(XmlElement span)
@ -129,8 +125,8 @@ namespace ICSharpCode.TextEditor.Document @@ -129,8 +125,8 @@ namespace ICSharpCode.TextEditor.Document
rule = span.GetAttribute("rule");
}
if (span.HasAttribute("noescapesequences")) {
noEscapeSequences = Boolean.Parse(span.GetAttribute("noescapesequences"));
if (span.HasAttribute("escapecharacter")) {
escapeCharacter = span.GetAttribute("escapecharacter")[0];
}
name = span.GetAttribute("name");

Loading…
Cancel
Save