0

Update to 7.1

This commit is contained in:
Rei
2012-08-14 22:13:27 +08:00
parent c48a19bb3f
commit 7d6da30689
84 changed files with 4179 additions and 2385 deletions

View File

@@ -2,7 +2,7 @@
Language: HTML, XML
*/
hljs.LANGUAGES.xml = function(){
hljs.LANGUAGES['xml'] = function(hljs) {
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
var TAG_INTERNALS = {
endsWithParent: true,
@@ -62,28 +62,32 @@ hljs.LANGUAGES.xml = function(){
},
{
className: 'tag',
begin: '<style', end: '>',
keywords: {'title': {'style': 1}},
/*
The lookahead pattern (?=...) ensures that 'begin' only matches
'<style' as a single word, followed by a whitespace or an
ending braket. The '$' is needed for the lexem to be recognized
by hljs.subMode() that tests lexems outside the stream.
*/
begin: '<style(?=\\s|>|$)', end: '>',
keywords: {title: 'style'},
contains: [TAG_INTERNALS],
starts: {
className: 'css',
end: '</style>', returnEnd: true,
subLanguage: 'css'
}
},
{
className: 'tag',
begin: '<script', end: '>',
keywords: {'title': {'script': 1}},
// See the comment in the <style tag about the lookahead pattern
begin: '<script(?=\\s|>|$)', end: '>',
keywords: {title: 'script'},
contains: [TAG_INTERNALS],
starts: {
className: 'javascript',
end: '</script>', returnEnd: true,
subLanguage: 'javascript'
}
},
{
className: 'vbscript',
begin: '<%', end: '%>',
subLanguage: 'vbscript'
},
@@ -100,4 +104,4 @@ hljs.LANGUAGES.xml = function(){
]
}
};
}();
}(hljs);