highlight.js
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -47,1 +47,2 @@ Syntax highlighting with language autodetection. | ||
- pumbur <pumbur@pumbur.net> | ||
- John Crepezzi <john.crepezzi@gmail.com> |
@@ -47,1 +47,2 @@ Подсветка синтаксиса с автоопределением языка. | ||
- pumbur <pumbur@pumbur.net> | ||
- Джон Крепецци <john.crepezzi@gmail.com> |
@@ -127,2 +127,14 @@ This is a full list of available classes corresponding to languages' | ||
Markdown ("markdown"): | ||
header header | ||
bullet list bullet | ||
emphasis emphasis | ||
strong strong emphasis | ||
blockquote blockquote | ||
code code | ||
horizontal_rule horizontal rule | ||
link_label link label | ||
link_url link url | ||
Django ("django"): | ||
@@ -129,0 +141,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "A node clone of highlight.js syntax highlighter library", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -92,2 +92,5 @@ # Highlight.js | ||
**Note**: provided styles work for code defined inside `<pre>` blocks. If you use | ||
custom markup you should modify styles accordingly. | ||
For full reference list of classes see [classref.txt][cr]. | ||
@@ -94,0 +97,0 @@ |
@@ -94,2 +94,6 @@ # Highlight.js | ||
**Внимание**: приложенные стили работают для кода, определённого внутри блоков | ||
`<pre>`. Если вы используете собственную разметку, стили нужно исправить | ||
соответствующим образом. | ||
Полный список классов приведён в файле [crossref.txt][cr]. | ||
@@ -96,0 +100,0 @@ |
@@ -70,3 +70,3 @@ /* | ||
offset += 1 | ||
else { | ||
else if (node.childNodes[i].nodeType == 1) { | ||
result.push({ | ||
@@ -127,4 +127,4 @@ event: 'start', | ||
result += ' ' + attribute.nodeName.toLowerCase(); | ||
if (attribute.nodeValue != undefined && attribute.nodeValue != false && attribute.nodeValue != null) { | ||
result += '="' + escape(attribute.nodeValue) + '"'; | ||
if (attribute.value != undefined && attribute.value != false && attribute.value != null) { | ||
result += '="' + escape(attribute.value) + '"'; | ||
} | ||
@@ -131,0 +131,0 @@ } |
@@ -17,3 +17,3 @@ /* | ||
}; | ||
var STRING = { | ||
var QUOTE_STRING = { | ||
className: 'string', | ||
@@ -25,6 +25,11 @@ begin: '"', end: '"', | ||
}; | ||
var APOS_STRING = { | ||
className: 'string', | ||
begin: '\'', end: '\'', | ||
relevance: 0 | ||
}; | ||
var TEST_CONDITION = { | ||
className: 'test_condition', | ||
begin: '', end: '', | ||
contains: [STRING, VAR1, VAR2, hljs.C_NUMBER_MODE], | ||
contains: [QUOTE_STRING, APOS_STRING, VAR1, VAR2, hljs.C_NUMBER_MODE], | ||
keywords: { | ||
@@ -48,7 +53,8 @@ 'literal': BASH_LITERAL | ||
}, | ||
VAR1, | ||
VAR2, | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
STRING, | ||
VAR1, | ||
VAR2, | ||
QUOTE_STRING, | ||
APOS_STRING, | ||
hljs.inherit(TEST_CONDITION, {begin: '\\[ ', end: ' \\]', relevance: 0}), | ||
@@ -55,0 +61,0 @@ hljs.inherit(TEST_CONDITION, {begin: '\\[\\[ ', end: ' \\]\\]'}) |
@@ -32,2 +32,10 @@ /* | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$', | ||
keywords: { | ||
'if': 1, 'else': 1, 'elif': 1, 'endif': 1, 'define': 1, 'undef': 1, 'warning': 1, | ||
'error': 1, 'line': 1, 'region': 1, 'endregion': 1, 'pragma': 1, 'checksum': 1 | ||
} | ||
}, | ||
{ | ||
className: 'string', | ||
@@ -34,0 +42,0 @@ begin: '@"', end: '"', |
@@ -60,3 +60,3 @@ /* | ||
STRING, CHAR_STRING, | ||
CURLY_COMMENT, PAREN_COMMENT, | ||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, | ||
FUNCTION | ||
@@ -66,7 +66,4 @@ ] | ||
] | ||
}, | ||
modes: [ | ||
] | ||
} | ||
}; | ||
}(); |
@@ -12,3 +12,3 @@ /* | ||
className: 'operator', | ||
begin: '(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma)\\b', end: ';|$', | ||
begin: '(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b', end: ';|$', | ||
keywords: { | ||
@@ -15,0 +15,0 @@ 'keyword': { |
@@ -15,2 +15,3 @@ /* | ||
}, | ||
illegal: '//', | ||
contains: [ | ||
@@ -17,0 +18,0 @@ { // can't use standard QUOTE_STRING_MODE since it's compiled with its own escape and doesn't use the local one |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
1319853
73
10009
140
0
1