Skip to content

Commit

Permalink
Revert "C-like: Change order of comment patterns and make multi-line …
Browse files Browse the repository at this point in the history
…one greedy. Fix #1337"

This reverts commit b98e5b9
  • Loading branch information
Golmote committed Mar 8, 2018
1 parent 5d65847 commit cebacdf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions components/prism-clike.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Prism.languages.clike = {
'comment': [
{
pattern: /(^|[^\\:])\/\/.*/,
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: true
},
{
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: true,
greedy: true
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
}
],
'string': {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-clike.min.js

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

7 changes: 3 additions & 4 deletions prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,12 @@ if (Prism.languages.markup) {
Prism.languages.clike = {
'comment': [
{
pattern: /(^|[^\\:])\/\/.*/,
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: true
},
{
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: true,
greedy: true
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
}
],
'string': {
Expand Down

0 comments on commit cebacdf

Please sign in to comment.