summaryrefslogtreecommitdiffstats
path: root/scintilla/lexers/LexHTML.cxx
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2011-04-06 05:17:16 +0000
committerXhmikosR <xhmikosr@users.sourceforge.net>2011-04-06 05:17:16 +0000
commitcb025f715a049c891d295b8b716c248caeaa83c7 (patch)
tree12887c859cd8e2a7803cf9c8c8afca3a48e3fd51 /scintilla/lexers/LexHTML.cxx
parent0915d604b2bc65504b35411ad7edc2eb451b8d86 (diff)
downloadnotepad2-mod-cb025f715a049c891d295b8b716c248caeaa83c7.zip
notepad2-mod-cb025f715a049c891d295b8b716c248caeaa83c7.tar.gz
notepad2-mod-cb025f715a049c891d295b8b716c248caeaa83c7.tar.bz2
update scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@462 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/lexers/LexHTML.cxx')
-rw-r--r--scintilla/lexers/LexHTML.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/scintilla/lexers/LexHTML.cxx b/scintilla/lexers/LexHTML.cxx
index a456612..242a37d 100644
--- a/scintilla/lexers/LexHTML.cxx
+++ b/scintilla/lexers/LexHTML.cxx
@@ -955,6 +955,37 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
continue;
}
+ // handle the start/end of Django comment
+ else if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) {
+ styler.ColourTo(i - 1, StateToPrint);
+ beforePreProc = state;
+ beforeLanguage = scriptLanguage;
+ if (inScriptType == eNonHtmlScript)
+ inScriptType = eNonHtmlScriptPreProc;
+ else
+ inScriptType = eNonHtmlPreProc;
+ i += 1;
+ visibleChars += 1;
+ scriptLanguage = eScriptComment;
+ state = SCE_H_COMMENT;
+ styler.ColourTo(i, SCE_H_ASP);
+ ch = static_cast<unsigned char>(styler.SafeGetCharAt(i));
+ continue;
+ }
+ else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) {
+ styler.ColourTo(i - 1, StateToPrint);
+ i += 1;
+ visibleChars += 1;
+ styler.ColourTo(i, SCE_H_ASP);
+ state = beforePreProc;
+ if (inScriptType == eNonHtmlScriptPreProc)
+ inScriptType = eNonHtmlScript;
+ else
+ inScriptType = eHtml;
+ scriptLanguage = beforeLanguage;
+ continue;
+ }
+
// handle the start Django template code
else if (isDjango && scriptLanguage != eScriptPython && (ch == '{' && (chNext == '%' || chNext == '{'))) {
if (chNext == '%')