diff options
-rw-r--r-- | doc/ScintillaHistory.html | 1 | ||||
-rw-r--r-- | lexers/LexHTML.cxx | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index dad037e23..5775acd75 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -358,6 +358,7 @@ </tr><tr> <td>Michael Mullin</td> <td>Carlos SS</td> + <td>vim</td> </tr> </table> <p> diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index e025c2b38..10db8eeb5 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -745,8 +745,18 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { - if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) { - levelCurrent += ((ch == '{') || (ch == '/')) ? 1 : -1; + if (ch == '#') { + int j = i + 1; + while ((j < lengthDoc) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelCurrent++; + } else if (styler.Match(j, "end")) { + levelCurrent--; + } + } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*')) ) { + levelCurrent += ((ch == '{') || (ch == '/') ) ? 1 : -1; } } else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) { levelCurrent--; |