diff options
author | nyamatongwe <devnull@localhost> | 2005-02-02 00:23:43 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-02-02 00:23:43 +0000 |
commit | 1f3edbb058c1656b4a166fd25acc80078d3deb72 (patch) | |
tree | d9bd35a937d362c8ed846082de8dc66639676c62 | |
parent | 3aab76b732560eaa16c7d4ab65648ba1e971c549 (diff) | |
download | scintilla-mirror-1f3edbb058c1656b4a166fd25acc80078d3deb72.tar.gz |
Modification to avoid triggering document comment keyword
unless preceded by space or '*'. This prevents email addresses
from highlighting like document comment keywords.
-rw-r--r-- | src/LexCPP.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index c6ca06505..7e83fcb62 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -136,8 +136,11 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo if (sc.Match('*', '/')) { sc.Forward(); sc.ForwardSetState(SCE_C_DEFAULT); - } else if (sc.ch == '@' || sc.ch == '\\') { - sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } } } else if (sc.state == SCE_C_COMMENTLINE || sc.state == SCE_C_COMMENTLINEDOC) { if (sc.ch == '\r' || sc.ch == '\n') { |