diff options
author | nyamatongwe <devnull@localhost> | 2001-05-05 02:19:48 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-05-05 02:19:48 +0000 |
commit | 7c12d8a6ea15b85adbd11be5d6ac19344afe1263 (patch) | |
tree | 79b01827c8a6466eee3b8c9a36f9c3d1e9581635 /src/LexHTML.cxx | |
parent | ed25a2c8a1c62d6db981c521c89f1cdecb2e20e6 (diff) | |
download | scintilla-mirror-7c12d8a6ea15b85adbd11be5d6ac19344afe1263.tar.gz |
Patch from Steve Lhomme to prevent %> from displaying as ASP if not in ASP
mode.
Setting up scriptLanguage more often for more consistent results.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r-- | src/LexHTML.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index cfcb532b1..e88c626af 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -67,7 +67,6 @@ static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, u return iResult; } -//static int ScriptOfState(int state,int defaultScript) static int ScriptOfState(int state) { int scriptLanguage; @@ -383,7 +382,6 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty int defaultScript = (lineState >> 4) & 0x0F; // 4 bits of script name int beforePreProc = (lineState >> 8) & 0xFF; // 8 bits of state - // int scriptLanguage = ScriptOfState(state,defaultScript); int scriptLanguage = ScriptOfState(state); bool fold = styler.GetPropertyInt("fold"); @@ -565,6 +563,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = StateForScript(defaultScript); } + scriptLanguage = eScriptVBS; styler.ColourTo(i, SCE_H_ASP); // fold whole script levelCurrent++; @@ -574,13 +573,16 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } // handle the end of a pre-processor = Non-HTML - else if (((inScriptType == eNonHtmlPreProc) - || (inScriptType == eNonHtmlScriptPreProc)) - && (((scriptLanguage == eScriptPHP) && (ch == '?')) - || (!isStringState(state) && !isCommentASPState(state) && (ch == '%'))) - && (chNext == '>')) { + else if ( + ((inScriptType == eNonHtmlPreProc) + || (inScriptType == eNonHtmlScriptPreProc)) && ( + ((scriptLanguage == eScriptPHP) && (ch == '?')) || + ((scriptLanguage != eScriptNone) && !isStringState(state) && + !isCommentASPState(state) && (ch == '%')) + ) && (chNext == '>')) { if (state == SCE_H_ASPAT) { - defaultScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, defaultScript); + defaultScript = segIsScriptingIndicator(styler, + styler.GetStartSegment(), i - 1, defaultScript); } // Bounce out of any ASP mode switch (state) { |