summaryrefslogtreecommitdiffstats
path: root/scintilla/lexers/LexHTML.cxx
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-01-02 10:39:55 +0000
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-01-02 10:39:55 +0000
commit50e87d02aaafe4666dd47c3970bc4cf2cf77a19c (patch)
tree28db5d8db767e7fa1383a074f21601bd1f3149cb /scintilla/lexers/LexHTML.cxx
parentca84f27f62c6bed3793e0c334c80ac472e5735f9 (diff)
downloadnotepad2-mod-50e87d02aaafe4666dd47c3970bc4cf2cf77a19c.zip
notepad2-mod-50e87d02aaafe4666dd47c3970bc4cf2cf77a19c.tar.gz
notepad2-mod-50e87d02aaafe4666dd47c3970bc4cf2cf77a19c.tar.bz2
update scintilla and copyright year
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@689 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/lexers/LexHTML.cxx')
-rw-r--r--scintilla/lexers/LexHTML.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/scintilla/lexers/LexHTML.cxx b/scintilla/lexers/LexHTML.cxx
index d20d688..5fe4746 100644
--- a/scintilla/lexers/LexHTML.cxx
+++ b/scintilla/lexers/LexHTML.cxx
@@ -261,28 +261,29 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
static int classifyTagHTML(unsigned int start, unsigned int end,
WordList &keywords, Accessor &styler, bool &tagDontFold,
bool caseSensitive, bool isXml, bool allowScripts) {
- char s[30 + 2];
+ char withSpace[30 + 2] = " ";
+ const char *s = withSpace + 1;
// Copy after the '<'
- unsigned int i = 0;
+ unsigned int i = 1;
for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) {
char ch = styler[cPos];
if ((ch != '<') && (ch != '/')) {
- s[i++] = caseSensitive ? ch : static_cast<char>(MakeLowerCase(ch));
+ withSpace[i++] = caseSensitive ? ch : static_cast<char>(MakeLowerCase(ch));
}
}
//The following is only a quick hack, to see if this whole thing would work
//we first need the tagname with a trailing space...
- s[i] = ' ';
- s[i+1] = '\0';
+ withSpace[i] = ' ';
+ withSpace[i+1] = '\0';
// if the current language is XML, I can fold any tag
// if the current language is HTML, I don't want to fold certain tags (input, meta, etc.)
//...to find it in the list of no-container-tags
- tagDontFold = (!isXml) && (NULL != strstr("meta link img area br hr input ", s));
+ tagDontFold = (!isXml) && (NULL != strstr(" area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr ", withSpace));
//now we can remove the trailing space
- s[i] = '\0';
+ withSpace[i] = '\0';
// No keywords -> all are known
char chAttr = SCE_H_TAGUNKNOWN;