aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexHTML.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-07-26 10:14:08 +0000
committernyamatongwe <devnull@localhost>2007-07-26 10:14:08 +0000
commit48807a25eb56dcec00d3b8e25bce49778aaa08d5 (patch)
tree26d28d02dcc649ce3135737ab9261627ab27ca19 /src/LexHTML.cxx
parent952fb3255d20f77c2eeb104d9fba2f9dd99206be (diff)
downloadscintilla-mirror-48807a25eb56dcec00d3b8e25bce49778aaa08d5.tar.gz
XML script indicator is only active if only whitespace before it.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r--src/LexHTML.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index c41fcbbfa..97be5f08f 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -71,8 +71,15 @@ static script_type segIsScriptingIndicator(Accessor &styler, unsigned int start,
return eScriptJS;
if (strstr(s, "php"))
return eScriptPHP;
- if (strstr(s, "xml"))
+ if (strstr(s, "xml")) {
+ const char *xml = strstr(s, "xml");
+ for (const char *t=s; t<xml; t++) {
+ if (!IsASpace(*t)) {
+ return prevValue;
+ }
+ }
return eScriptXML;
+ }
return prevValue;
}