Skip to content

Commit

Permalink
Replace [\w\W] with [\s\S] and [0-9] with \d in regexes (#1107)
Browse files Browse the repository at this point in the history
* Replace [\w\W] with [^] and [0-9] with \d in regexes

* Replace [\s\S] with [^]

* Replace [^] with [\s\S]
  • Loading branch information
valtlai authored and Golmote committed May 8, 2017
1 parent 3a40922 commit 8aa2cc4
Show file tree
Hide file tree
Showing 38 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion components/prism-actionscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Prism.languages.actionscript['class-name'].alias = 'function';
if (Prism.languages.markup) {
Prism.languages.insertBefore('actionscript', 'string', {
'xml': {
pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\w\W])*\2)*\s*\/?>/,
pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\s\S])*\2)*\s*\/?>/,
lookbehind: true,
inside: {
rest: Prism.languages.markup
Expand Down
4 changes: 2 additions & 2 deletions components/prism-ada.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Prism.languages.ada = {
'string': /"(?:""|[^"\r\f\n])*"/i,
'number': [
{
pattern: /\b[0-9](?:_?[0-9])*#[0-9A-F](?:_?[0-9A-F])*(?:\.[0-9A-F](?:_?[0-9A-F])*)?#(?:E[+-]?[0-9](?:_?[0-9])*)?/i
pattern: /\b\d(?:_?\d)*#[0-9A-F](?:_?[0-9A-F])*(?:\.[0-9A-F](?:_?[0-9A-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i
},
{
pattern: /\b[0-9](?:_?[0-9])*(?:\.[0-9](?:_?[0-9])*)?(?:E[+-]?[0-9](?:_?[0-9])*)?\b/i
pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i
}
],
'attr-name': /\b'\w+/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-applescript.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Prism.languages.applescript = {
'comment': [
// Allow one level of nesting
/\(\*(?:\(\*[\w\W]*?\*\)|[\w\W])*?\*\)/,
/\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/,
/--.+/,
/#.+/
],
Expand Down
6 changes: 3 additions & 3 deletions components/prism-aspnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ Prism.languages.aspnet = Prism.languages.extend('markup', {
}
});
// Regexp copied from prism-markup, with a negative look-ahead added
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i;
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i;

// match directives of attribute value foo="<% Bar %>"
Prism.languages.insertBefore('inside', 'punctuation', {
'directive tag': Prism.languages.aspnet['directive tag']
}, Prism.languages.aspnet.tag.inside["attr-value"]);

Prism.languages.insertBefore('aspnet', 'comment', {
'asp comment': /<%--[\w\W]*?--%>/
'asp comment': /<%--[\s\S]*?--%>/
});

// script runat="server" contains csharp, not javascript
Prism.languages.insertBefore('aspnet', Prism.languages.javascript ? 'script' : 'tag', {
'asp script': {
pattern: /(<script(?=.*runat=['"]?server['"]?)[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,
pattern: /(<script(?=.*runat=['"]?server['"]?)[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,
lookbehind: true,
inside: Prism.languages.csharp || {}
}
Expand Down
4 changes: 2 additions & 2 deletions components/prism-bash.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
variable: [
// Arithmetic Environment
{
pattern: /\$?\(\([\w\W]+?\)\)/,
pattern: /\$?\(\([\s\S]+?\)\)/,
inside: {
// If there is a $ sign at the beginning highlight $(( and )) as variable
variable: [{
pattern: /(^\$\(\([\w\W]+)\)\)/,
pattern: /(^\$\(\([\s\S]+)\)\)/,
lookbehind: true
},
/^\$\(\(/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-clike.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Prism.languages.clike = {
'comment': [
{
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true
},
{
Expand Down
2 changes: 1 addition & 1 deletion components/prism-crystal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],

number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[0-9a-fA-F_]*[0-9a-fA-F]|(?:[0-9](?:[0-9_]*[0-9])?)(?:\.[0-9_]*[0-9])?(?:[eE][+-]?[0-9_]*[0-9])?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[0-9a-fA-F_]*[0-9a-fA-F]|(?:\d(?:[0-9_]*\d)?)(?:\.[0-9_]*\d)?(?:[eE][+-]?[0-9_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
});

var rest = Prism.util.clone(Prism.languages.crystal);
Expand Down
8 changes: 4 additions & 4 deletions components/prism-css.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Prism.languages.css = {
'comment': /\/\*[\w\W]*?\*\//,
'comment': /\/\*[\s\S]*?\*\//,
'atrule': {
pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
inside: {
'rule': /@[\w-]+/
// See rest below
}
},
'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
'url': /url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
'string': {
pattern: /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
pattern: /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'property': /(\b|\B)[\w-]+(?=\s*:)/i,
Expand All @@ -24,7 +24,7 @@ Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css
if (Prism.languages.markup) {
Prism.languages.insertBefore('markup', 'tag', {
'style': {
pattern: /(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,
pattern: /(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,
lookbehind: true,
inside: Prism.languages.css,
alias: 'language-css'
Expand Down
2 changes: 1 addition & 1 deletion components/prism-d.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Prism.languages.d.comment = [
// /+ +/
{
// Allow one level of nesting
pattern: /(^|[^\\])\/\+(?:\/\+[\w\W]*?\+\/|[\w\W])*?\+\//,
pattern: /(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//,
lookbehind: true
}
].concat(Prism.languages.d.comment);
Expand Down
6 changes: 3 additions & 3 deletions components/prism-django.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

var _django_template = {
'property': {
pattern: /(?:{{|{%)[\w\W]*?(?:%}|}})/g,
pattern: /(?:{{|{%)[\s\S]*?(?:%}|}})/g,
greedy: true,
inside: {
'string': {
Expand All @@ -20,9 +20,9 @@ var _django_template = {
}
};

Prism.languages.django = Prism.languages.extend('markup', {'comment': /(?:<!--|{#)[\w\W]*?(?:#}|-->)/});
Prism.languages.django = Prism.languages.extend('markup', {'comment': /(?:<!--|{#)[\s\S]*?(?:#}|-->)/});
// Updated html tag pattern to allow template tags inside html tags
Prism.languages.django.tag.pattern = /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^>=]+))?)*\s*\/?>/i;
Prism.languages.django.tag.pattern = /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^>=]+))?)*\s*\/?>/i;
Prism.languages.insertBefore('django', 'entity', _django_template);
Prism.languages.insertBefore('inside', 'tag', _django_template, Prism.languages.django.tag);

Expand Down
2 changes: 1 addition & 1 deletion components/prism-fsharp.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Prism.languages.fsharp = Prism.languages.extend('clike', {
'comment': [
{
pattern: /(^|[^\\])\(\*[\w\W]*?\*\)/,
pattern: /(^|[^\\])\(\*[\s\S]*?\*\)/,
lookbehind: true
},
{
Expand Down
2 changes: 1 addition & 1 deletion components/prism-glsl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prism.languages.glsl = Prism.languages.extend('clike', {
'comment': [
/\/\*[\w\W]*?\*\//,
/\/\*[\s\S]*?\*\//,
/\/\/(?:\\(?:\r\n|[\s\S])|.)*/
],
'number': /\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-groovy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Prism.languages.groovy = Prism.languages.extend('clike', {
'keyword': /\b(as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,
'string': [
{
pattern: /("""|''')[\W\w]*?\1|(\$\/)(\$\/\$|[\W\w])*?\/\$/,
pattern: /("""|''')[\s\S]*?\1|(\$\/)(\$\/\$|[\s\S])*?\/\$/,
greedy: true
},
{
Expand Down
6 changes: 3 additions & 3 deletions components/prism-handlebars.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(Prism) {

var handlebars_pattern = /\{\{\{[\w\W]+?\}\}\}|\{\{[\w\W]+?\}\}/g;
var handlebars_pattern = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;

Prism.languages.handlebars = Prism.languages.extend('markup', {
'handlebars': {
Expand All @@ -22,7 +22,7 @@
pattern: /\[[^\]]+\]/,
inside: {
punctuation: /\[|\]/,
variable: /[\w\W]+/
variable: /[\s\S]+/
}
},
'punctuation': /[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,
Expand All @@ -35,7 +35,7 @@
// surround markup
Prism.languages.insertBefore('handlebars', 'tag', {
'handlebars-comment': {
pattern: /\{\{![\w\W]*?\}\}/,
pattern: /\{\{![\s\S]*?\}\}/,
alias: ['handlebars','comment']
}
});
Expand Down
2 changes: 1 addition & 1 deletion components/prism-haskell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prism.languages.haskell= {
'comment': {
pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\w\W]*?-})/m,
pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/m,
lookbehind: true
},
'char': /'([^\\']|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,
Expand Down
4 changes: 2 additions & 2 deletions components/prism-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Prism.languages.http = {
}
},
'response-status': {
pattern: /^HTTP\/1.[01] [0-9]+.*/m,
pattern: /^HTTP\/1.[01] \d+.*/m,
inside: {
// Status, e.g. 200 OK
property: {
pattern: /(^HTTP\/1.[01] )[0-9]+.*/i,
pattern: /(^HTTP\/1.[01] )\d+.*/i,
lookbehind: true
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/prism-javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Prism.languages.insertBefore('javascript', 'string', {
if (Prism.languages.markup) {
Prism.languages.insertBefore('markup', 'tag', {
'script': {
pattern: /(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,
pattern: /(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,
lookbehind: true,
inside: Prism.languages.javascript,
alias: 'language-javascript'
Expand Down
4 changes: 2 additions & 2 deletions components/prism-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
var javascript = Prism.util.clone(Prism.languages.javascript);

Prism.languages.jsx = Prism.languages.extend('markup', javascript);
Prism.languages.jsx.tag.pattern= /<\/?[\w\.:-]+\s*(?:\s+(?:[\w\.:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?|\{\.{3}\w+\})\s*)*\/?>/i;
Prism.languages.jsx.tag.pattern= /<\/?[\w\.:-]+\s*(?:\s+(?:[\w\.:-]+(?:=(?:("|')(\\?[\s\S])*?\1|[^\s'">=]+|(\{[\s\S]*?\})))?|\{\.{3}\w+\})\s*)*\/?>/i;

Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:('|")[\w\W]*?(\1)|[^\s>]+)/i;
Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:('|")[\s\S]*?(\1)|[^\s>]+)/i;

Prism.languages.insertBefore('inside', 'attr-name', {
'spread': {
Expand Down
6 changes: 3 additions & 3 deletions components/prism-latex.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'comment': /%.*/m,
// the verbatim environment prints whitespace to the document
'cdata': {
pattern: /(\\begin\{((?:verbatim|lstlisting)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,
pattern: /(\\begin\{((?:verbatim|lstlisting)\*?)\})([\s\S]*?)(?=\\end\{\2\})/,
lookbehind: true
},
/*
Expand All @@ -20,12 +20,12 @@
*/
'equation': [
{
pattern: /\$(?:\\?[\w\W])*?\$|\\\((?:\\?[\w\W])*?\\\)|\\\[(?:\\?[\w\W])*?\\\]/,
pattern: /\$(?:\\?[\s\S])*?\$|\\\((?:\\?[\s\S])*?\\\)|\\\[(?:\\?[\s\S])*?\\\]/,
inside: insideEqu,
alias: 'string'
},
{
pattern: /(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,
pattern: /(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})([\s\S]*?)(?=\\end\{\2\})/,
lookbehind: true,
inside: insideEqu,
alias: 'string'
Expand Down
2 changes: 1 addition & 1 deletion components/prism-less.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Prism.languages.less = Prism.languages.extend('css', {
'comment': [
/\/\*[\w\W]*?\*\//,
/\/\*[\s\S]*?\*\//,
{
pattern: /(^|[^\\])\/\/.*/,
lookbehind: true
Expand Down
2 changes: 1 addition & 1 deletion components/prism-livescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Prism.languages.livescript = {
},
'comment': [
{
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true,
greedy: true
},
Expand Down
12 changes: 6 additions & 6 deletions components/prism-markup.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Prism.languages.markup = {
'comment': /<!--[\w\W]*?-->/,
'prolog': /<\?[\w\W]+?\?>/,
'doctype': /<!DOCTYPE[\w\W]+?>/i,
'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
'comment': /<!--[\s\S]*?-->/,
'prolog': /<\?[\s\S]+?\?>/,
'doctype': /<!DOCTYPE[\s\S]+?>/i,
'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
'tag': {
pattern: /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
pattern: /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i,
inside: {
'tag': {
pattern: /^<\/?[^\s>\/]+/i,
Expand All @@ -14,7 +14,7 @@ Prism.languages.markup = {
}
},
'attr-value': {
pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
pattern: /=(?:('|")[\s\S]*?(\1)|[^\s>]+)/i,
inside: {
'punctuation': /[=>"']/
}
Expand Down
2 changes: 1 addition & 1 deletion components/prism-nsis.js

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

8 changes: 4 additions & 4 deletions components/prism-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Prism.languages.php = Prism.languages.extend('clike', {
'keyword': /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
'constant': /\b[A-Z0-9_]{2,}\b/,
'comment': {
pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
lookbehind: true,
greedy: true
}
Expand Down Expand Up @@ -64,7 +64,7 @@ if (Prism.languages.markup) {
env.tokenStack = [];

env.backupCode = env.code;
env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function(match) {
env.code = env.code.replace(/(?:<\?php|<\?)[\s\S]*?(?:\?>)/ig, function(match) {
env.tokenStack.push(match);

return '{{{PHP' + env.tokenStack.length + '}}}';
Expand Down Expand Up @@ -96,7 +96,7 @@ if (Prism.languages.markup) {
// Wrap tokens in classes that are missing them
Prism.hooks.add('wrap', function(env) {
if (env.language === 'php' && env.type === 'markup') {
env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, "<span class=\"token php\">$1</span>");
env.content = env.content.replace(/(\{\{\{PHP\d+\}\}\})/g, "<span class=\"token php\">$1</span>");
}
});

Expand All @@ -106,6 +106,6 @@ if (Prism.languages.markup) {
pattern: /<[^?]\/?(.*?)>/,
inside: Prism.languages.markup
},
'php': /\{\{\{PHP[0-9]+\}\}\}/
'php': /\{\{\{PHP\d+\}\}\}/
});
}
6 changes: 3 additions & 3 deletions components/prism-powershell.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Prism.languages.powershell = {
'comment': [
{
pattern: /(^|[^`])<#[\w\W]*?#>/,
pattern: /(^|[^`])<#[\s\S]*?#>/,
lookbehind: true
},
{
Expand All @@ -11,7 +11,7 @@ Prism.languages.powershell = {
],
'string': [
{
pattern: /"(`?[\w\W])*?"/,
pattern: /"(`?[\s\S])*?"/,
greedy: true,
inside: {
'function': {
Expand All @@ -27,7 +27,7 @@ Prism.languages.powershell = {
}
],
// Matches name spaces as well as casts, attribute decorators. Force starting with letter to avoid matching array indices
'namespace': /\[[a-z][\w\W]*?\]/i,
'namespace': /\[[a-z][\s\S]*?\]/i,
'boolean': /\$(true|false)\b/i,
'variable': /\$\w+\b/i,
// Cmdlets and aliases. Aliases should come last, otherwise "write" gets preferred over "write-host" for example
Expand Down
2 changes: 1 addition & 1 deletion components/prism-pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
'comment': [
{
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
greedy: true,
lookbehind: true
},
Expand Down
2 changes: 1 addition & 1 deletion components/prism-qore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prism.languages.qore = Prism.languages.extend('clike', {
'comment': {
pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:\/\/|#).*)/,
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,
lookbehind: true
},
// Overridden to allow unescaped multi-line strings
Expand Down
Loading

0 comments on commit 8aa2cc4

Please sign in to comment.