diff options
| author | nyamatongwe <unknown> | 2005-02-02 00:23:43 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2005-02-02 00:23:43 +0000 | 
| commit | 29c5aeba17b325736abc004c008891b7ebfc4293 (patch) | |
| tree | d9bd35a937d362c8ed846082de8dc66639676c62 /src/LexCPP.cxx | |
| parent | 603cab7b90e3069409f3b8b1ec96e23e81b40542 (diff) | |
| download | scintilla-mirror-29c5aeba17b325736abc004c008891b7ebfc4293.tar.gz | |
Modification to avoid triggering document comment keyword
unless preceded by space or '*'. This prevents email addresses
from highlighting like document comment keywords.
Diffstat (limited to 'src/LexCPP.cxx')
| -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') {  | 
