diff --git a/components/synedit/languages/syneditstrconst.ca.po b/components/synedit/languages/syneditstrconst.ca.po index 6363d8d93f..592170dc58 100644 --- a/components/synedit/languages/syneditstrconst.ca.po +++ b/components/synedit/languages/syneditstrconst.ca.po @@ -105,6 +105,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "" diff --git a/components/synedit/languages/syneditstrconst.cs.po b/components/synedit/languages/syneditstrconst.cs.po index 17e37ce14f..74fd7685a4 100644 --- a/components/synedit/languages/syneditstrconst.cs.po +++ b/components/synedit/languages/syneditstrconst.cs.po @@ -107,6 +107,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Podmínka" diff --git a/components/synedit/languages/syneditstrconst.de.po b/components/synedit/languages/syneditstrconst.de.po index 0a78f38566..0f64023cb6 100644 --- a/components/synedit/languages/syneditstrconst.de.po +++ b/components/synedit/languages/syneditstrconst.de.po @@ -109,6 +109,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Bedingung" diff --git a/components/synedit/languages/syneditstrconst.es.po b/components/synedit/languages/syneditstrconst.es.po index 3c70932a6b..e13c6ea795 100644 --- a/components/synedit/languages/syneditstrconst.es.po +++ b/components/synedit/languages/syneditstrconst.es.po @@ -107,6 +107,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Condición" diff --git a/components/synedit/languages/syneditstrconst.fi.po b/components/synedit/languages/syneditstrconst.fi.po index a8426594b3..236c127f74 100644 --- a/components/synedit/languages/syneditstrconst.fi.po +++ b/components/synedit/languages/syneditstrconst.fi.po @@ -100,6 +100,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Ehdot" diff --git a/components/synedit/languages/syneditstrconst.fr.po b/components/synedit/languages/syneditstrconst.fr.po index c177a9c0ae..9c7ebf16fc 100644 --- a/components/synedit/languages/syneditstrconst.fr.po +++ b/components/synedit/languages/syneditstrconst.fr.po @@ -107,6 +107,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Condition" diff --git a/components/synedit/languages/syneditstrconst.he.po b/components/synedit/languages/syneditstrconst.he.po index 7023437242..782275f026 100644 --- a/components/synedit/languages/syneditstrconst.he.po +++ b/components/synedit/languages/syneditstrconst.he.po @@ -105,6 +105,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "תנאי" diff --git a/components/synedit/languages/syneditstrconst.hu.po b/components/synedit/languages/syneditstrconst.hu.po index 488cf1dd38..b0928bb45f 100644 --- a/components/synedit/languages/syneditstrconst.hu.po +++ b/components/synedit/languages/syneditstrconst.hu.po @@ -107,6 +107,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Feltétel" diff --git a/components/synedit/languages/syneditstrconst.id.po b/components/synedit/languages/syneditstrconst.id.po index debc3c12a0..d8702d3380 100644 --- a/components/synedit/languages/syneditstrconst.id.po +++ b/components/synedit/languages/syneditstrconst.id.po @@ -108,6 +108,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "" diff --git a/components/synedit/languages/syneditstrconst.it.po b/components/synedit/languages/syneditstrconst.it.po index a927d24441..5e3e049fd7 100644 --- a/components/synedit/languages/syneditstrconst.it.po +++ b/components/synedit/languages/syneditstrconst.it.po @@ -108,6 +108,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Condizione" diff --git a/components/synedit/languages/syneditstrconst.lt.po b/components/synedit/languages/syneditstrconst.lt.po index 17bb9f39f9..63659450f6 100644 --- a/components/synedit/languages/syneditstrconst.lt.po +++ b/components/synedit/languages/syneditstrconst.lt.po @@ -108,6 +108,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Sąlyga" diff --git a/components/synedit/languages/syneditstrconst.nl.po b/components/synedit/languages/syneditstrconst.nl.po index aa7b6bb11d..480373743a 100644 --- a/components/synedit/languages/syneditstrconst.nl.po +++ b/components/synedit/languages/syneditstrconst.nl.po @@ -105,6 +105,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "" diff --git a/components/synedit/languages/syneditstrconst.pl.po b/components/synedit/languages/syneditstrconst.pl.po index 23b1fbedc4..d13f09d919 100644 --- a/components/synedit/languages/syneditstrconst.pl.po +++ b/components/synedit/languages/syneditstrconst.pl.po @@ -108,6 +108,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Warunek" diff --git a/components/synedit/languages/syneditstrconst.pot b/components/synedit/languages/syneditstrconst.pot index 6c3b908e9c..687c9c0da8 100644 --- a/components/synedit/languages/syneditstrconst.pot +++ b/components/synedit/languages/syneditstrconst.pot @@ -97,6 +97,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "" diff --git a/components/synedit/languages/syneditstrconst.pt_BR.po b/components/synedit/languages/syneditstrconst.pt_BR.po index a215662336..49267a11f2 100644 --- a/components/synedit/languages/syneditstrconst.pt_BR.po +++ b/components/synedit/languages/syneditstrconst.pt_BR.po @@ -107,6 +107,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Condição" diff --git a/components/synedit/languages/syneditstrconst.ru.po b/components/synedit/languages/syneditstrconst.ru.po index a0a6476df4..5354b17080 100644 --- a/components/synedit/languages/syneditstrconst.ru.po +++ b/components/synedit/languages/syneditstrconst.ru.po @@ -107,6 +107,10 @@ msgstr "Комментарий с фигурными скобками" msgid "Slash Comment" msgstr "Комментарий с косыми чертами" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Условие" diff --git a/components/synedit/languages/syneditstrconst.tr.po b/components/synedit/languages/syneditstrconst.tr.po index a5db29f5d7..6eaaee5de8 100644 --- a/components/synedit/languages/syneditstrconst.tr.po +++ b/components/synedit/languages/syneditstrconst.tr.po @@ -111,6 +111,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Şart" diff --git a/components/synedit/languages/syneditstrconst.uk.po b/components/synedit/languages/syneditstrconst.uk.po index 6f0c917da5..2279b4c447 100644 --- a/components/synedit/languages/syneditstrconst.uk.po +++ b/components/synedit/languages/syneditstrconst.uk.po @@ -110,6 +110,10 @@ msgstr "" msgid "Slash Comment" msgstr "" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "Умова" diff --git a/components/synedit/languages/syneditstrconst.zh_CN.po b/components/synedit/languages/syneditstrconst.zh_CN.po index 71459c3ad9..1d27bbc908 100644 --- a/components/synedit/languages/syneditstrconst.zh_CN.po +++ b/components/synedit/languages/syneditstrconst.zh_CN.po @@ -108,6 +108,10 @@ msgstr "花括号注释" msgid "Slash Comment" msgstr "斜杠注释" +#: syneditstrconst.syns_attrcommentsym +msgid "Comment Symbol" +msgstr "" + #: syneditstrconst.syns_attrcondition msgid "Condition" msgstr "状态" diff --git a/components/synedit/syneditstrconst.pp b/components/synedit/syneditstrconst.pp index f1dd38906c..05482f770e 100644 --- a/components/synedit/syneditstrconst.pp +++ b/components/synedit/syneditstrconst.pp @@ -66,6 +66,7 @@ resourcestring SYNS_AttrCharacter = 'Character'; SYNS_AttrClass = 'Class'; SYNS_AttrComment = 'Comment'; + SYNS_AttrCommentSym = 'Comment Symbol'; SYNS_AttrCommentAnsi = 'ANSI Comment'; SYNS_AttrCommentCurly = 'Curly Comment'; SYNS_AttrCommentSlash = 'Slash Comment'; @@ -202,6 +203,7 @@ const SYNS_XML_AttrCharacter = 'Character'; SYNS_XML_AttrClass = 'Class'; SYNS_XML_AttrComment = 'Comment'; + SYNS_XML_AttrCommentSym = 'Comment Symbol'; SYNS_XML_AttrCommentAnsi = 'Ansi Comment'; SYNS_XML_AttrCommentCurly = 'Curly Comment'; SYNS_XML_AttrCommentSlash = 'Slash Comment'; diff --git a/components/synedit/synhighlighterxml.pas b/components/synedit/synhighlighterxml.pas index 26d704108e..ff5499ca57 100644 --- a/components/synedit/synhighlighterxml.pas +++ b/components/synedit/synhighlighterxml.pas @@ -61,7 +61,7 @@ uses type TtkTokenKind = (tkAposAttrValue, tkAposEntityRef, tkAttribute, tkCDATA, - tkComment, tkElement, tkEntityRef, tkEqual, tkNull, tkProcessingInstruction, + tkComment, tkCommentSym, tkElement, tkEntityRef, tkEqual, tkNull, tkProcessingInstruction, tkQuoteAttrValue, tkQuoteEntityRef, tkSpace, tkSymbol, tkText, // tknsAposAttrValue, tknsAposEntityRef, tknsAttribute, tknsEqual, @@ -104,6 +104,7 @@ type TSynXMLSyn = class(TSynCustomXmlHighlighter) private + fCommentSymbolAttri: TSynHighlighterAttributes; fRange: TRangeState; fLine: PChar; Run: Longint; @@ -203,6 +204,8 @@ type read fProcessingInstructionAttri write fProcessingInstructionAttri; property CommentAttri: TSynHighlighterAttributes read fCommentAttri write fCommentAttri; + property CommentSymbolAttri: TSynHighlighterAttributes read fCommentSymbolAttri + write fCommentSymbolAttri; property DocTypeAttri: TSynHighlighterAttributes read fDocTypeAttri write fDocTypeAttri; property SpaceAttri: TSynHighlighterAttributes read fSpaceAttri @@ -229,6 +232,7 @@ begin fProcessingInstructionAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrProcessingInstr, SYNS_XML_AttrProcessingInstr); fCDATAAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrCDATASection, SYNS_XML_AttrCDATASection); fCommentAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrComment, SYNS_XML_AttrComment); + fCommentSymbolAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrCommentSym, SYNS_XML_AttrCommentSym); fDocTypeAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrDOCTYPESection, SYNS_XML_AttrDOCTYPESection); fAttributeAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrAttributeName, SYNS_XML_AttrAttributeName); fnsAttributeAttri:= TSynHighlighterAttributes.Create(@SYNS_AttrNamespaceAttrName, SYNS_XML_AttrNamespaceAttrName); @@ -269,6 +273,7 @@ begin fCommentAttri.Background:= clSilver; fCommentAttri.Foreground:= clGray; fCommentAttri.Style:= [fsbold, fsItalic]; + fCommentSymbolAttri.Clear; fSymbolAttri.Foreground:= clblue; fSymbolAttri.Style:= []; @@ -277,6 +282,7 @@ begin AddAttribute(fProcessingInstructionAttri); AddAttribute(fDocTypeAttri); AddAttribute(fCommentAttri); + AddAttribute(fCommentSymbolAttri); AddAttribute(fElementAttri); AddAttribute(fAttributeAttri); AddAttribute(fnsAttributeAttri); @@ -381,7 +387,7 @@ begin if (fLine[Run] = '!') then begin if NextTokenIs('--') then begin - fTokenID := tkSymbol; + fTokenID := tkCommentSym; fRange := rsComment; StartXmlCodeFoldBlock(cfbtXmlComment); Inc(Run, 3); @@ -427,7 +433,7 @@ begin if (fLine[Run] = '-') and (fLine[Run + 1] = '-') and (fLine[Run + 2] = '>') then begin - fTokenID := tkSymbol; + fTokenID := tkCommentSym; fRange:= rsText; Inc(Run, 3); if TopXmlCodeFoldBlockType = cfbtXmlComment then @@ -896,6 +902,7 @@ begin tknsAposEntityRef: Result:= fEntityRefAttri; tkProcessingInstruction: Result:= fProcessingInstructionAttri; tkComment: Result:= fCommentAttri; + tkCommentSym: Result:= fCommentSymbolAttri; tkDocType: Result:= fDocTypeAttri; tkSymbol: Result:= fSymbolAttri; tkSpace: Result:= fSpaceAttri;