Skip to content

Commit

Permalink
Pure: Make inline-lang greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 76dc925 commit 92318b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions components/prism-pure.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
(function (Prism) {
Prism.languages.pure = {
'comment': [
{
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
},
/#!.+/
],
'inline-lang': {
pattern: /%<[\s\S]+?%>/,
greedy: true,
inside: {
'lang': {
pattern: /(^%< *)-\*-.+?-\*-/,
Expand All @@ -14,18 +26,6 @@
}
}
},
'comment': [
{
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
greedy: true,
lookbehind: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
},
/#!.+/
],
'string': {
pattern: /"(?:\\.|[^"\\\r\n])*"/,
greedy: true
Expand Down
2 changes: 1 addition & 1 deletion components/prism-pure.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 92318b0

Please sign in to comment.